import rxAjax from '@/assets/js/ajax.js';

//大屏授权 api接口
export const screenPermissionApi = {};

screenPermissionApi.baseUrl= '/api-screen/screen/core/screenPermission';
screenPermissionApi.exportUrl= screenPermissionApi.baseUrl + '/listExport';

//查询列表
screenPermissionApi.query=function (parameter) {
  let url= screenPermissionApi.baseUrl + '/query';
  return rxAjax.postJson(url,parameter).then (res => {
    return res.result
  })
}

/**
* 获取单记录
* @param pkId
* @returns {*}
*/
screenPermissionApi.get =function(pkId) {
  let url= screenPermissionApi.baseUrl + '/get?pkId=' + pkId;
  return rxAjax.get(url);
}

//保存数据
screenPermissionApi.save =function(parameter) {
  let url= screenPermissionApi.baseUrl + '/save';
  return rxAjax.postJson(url,parameter);
}

//删除数据
screenPermissionApi.del =function(parameter) {
  let url= screenPermissionApi.baseUrl + '/del';
  return rxAjax.postUrl(url,parameter);
}

//获取分享给我的大屏0
screenPermissionApi.getShareWithMe =function(appId) {
	let url= screenPermissionApi.baseUrl + '/getShareWithMe?appId='+appId;
	return rxAjax.get(url);
}
export  default screenPermissionApi;

